
null.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <main>:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main()
{
   0:	a9be7bfd 	stp	x29, x30, [sp, #-32]!
   4:	910003fd 	mov	x29, sp
	char *ptr;
	
	if ( (ptr = (char *)malloc(0)) == NULL)
   8:	d2800000 	mov	x0, #0x0                   	// #0
   c:	94000000 	bl	0 <malloc>
  10:	f9000fa0 	str	x0, [x29, #24] ; ptr = malloc
  14:	f9400fa0 	ldr	x0, [x29, #24] ; x0 = ptr
  18:	f100001f 	cmp	x0, #0x0
  1c:	540000a1 	b.ne	30 <main+0x30>  // b.any
		puts("Got a null pointer");
  20:	90000000 	adrp	x0, 0 <main>
  24:	91000000 	add	x0, x0, #0x0
  28:	94000000 	bl	0 <puts>
  2c:	14000004 	b	3c <main+0x3c>
	else 
		puts("Got a valid pointer");	// right
  30:	90000000 	adrp	x0, 0 <main>
  34:	91000000 	add	x0, x0, #0x0
  38:	94000000 	bl	0 <puts>
		
	ptr = "xiaozhi";
  3c:	90000000 	adrp	x0, 0 <main>
  40:	91000000 	add	x0, x0, #0x0
  44:	f9000fa0 	str	x0, [x29, #24] ; ptr = "xiaozhi"
	printf("%s\n", ptr);
  48:	f9400fa0 	ldr	x0, [x29, #24] ; ptr
  4c:	94000000 	bl	0 <puts>
  50:	52800000 	mov	w0, #0x0                   	// #0
}
  54:	a8c27bfd 	ldp	x29, x30, [sp], #32
  58:	d65f03c0 	ret
